package main

import (
	"04_pachong/engine"
	"04_pachong/persist"
	"04_pachong/scheduler"
	"net/http"
)

func main() {

	request, _ := http.NewRequest(http.MethodGet, "http://www.zhenai.com/zhenghun", nil)

	concurrentEngine := engine.ConcurrentEngine{
		Scheduler:   &scheduler.QueuedScheduler{},
		WorkerCount: 100,
		ItemChan:    persist.ItemServer(),
	}

	concurrentEngine.Run(engine.Request{
		HttpRequest: request,
		ParserFunc:  parser.ParserCityList,
	})
}
